package utils

import (
	"time"
)

func (this *MultiGroupTask) WaitForFuncDone(groupid interface{}, timeOut time.Duration, fn func()) bool {
	wt := NewWaitWithTimeoutAdd1()
	this.PostTaskFunc(groupid, func() {
		fn()
		wt.Done()
	})
	return wt.WaitFor(timeOut)
}
